package com.ruoyi.datastatistics.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 终端用水量VO
 *
 * @author TsingYu
 * @version 1.0
 * @date 2024/8/3 13:47
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TerminalUsageVO implements Serializable {

    private static final long serialVersionUID = 3094220249296963682L;

    /**
     * 终端id
     */
    @Excel(name = "设备编号", sort = 5)
    private String terminalId;

    /**
     * 终端名称
     */
    private String terminalName;

    /**
     * 区域id
     */
    private Long sheetsId;

    /**
     * 区域代码
     */
    private String sheetsCode;

    /**
     * 区域名称
     */
    @Excel(name = "所属区域", sort = 1)
    private String sheetsName;

    /**
     * 日期
     */
    @Excel(name = "日期", sort = 2, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date date;

    /**
     * 用户编号
     */
    @Excel(name = "用户编号", sort = 3)
    private String userId;

    /**
     * 用户名称
     */
    @Excel(name = "用户名称", sort = 4)
    private String userName;

    /**
     * 安装地址
     */
    @Excel(name = "安装地址", sort = 6)
    private String installAddress;

    /**
     * 用水量(m³)
     */
    @Excel(name = "用水量(m³)", sort = 7, decimalFormat = 2)
    private BigDecimal usage;

    /**
     * 区域用水量(m³)
     */
    @Excel(name = "区域用水量(m³)", sort = 8, decimalFormat = 2)
    private BigDecimal totalUsage;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 筛选日期-开始
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String beginDate;

    /**
     * 筛选日期-结束
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String endDate;

    /**
     * 筛选用水量最大值
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private BigDecimal usageMax;

    /**
     * 筛选用水量最小值
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private BigDecimal usageMin;

    /**
     * 筛选区域id
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private List<Long> sheetsIds;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private Long sysUserId;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String tenantId;

    @JsonIgnore
    private Boolean groupByDate;
}
